#pragma once

class CXeAxWindow : public CComObject<CAxHostWindow>,
	public IOleCommandTarget
{
public:
	typedef CComObject<CAxHostWindow> _Super;

	virtual HRESULT STDMETHODCALLTYPE QueryInterface(
		REFIID riid,
		void **ppvObject
		);

	STDMETHOD(QueryService)(
		REFGUID rsid,
		REFIID riid,
		void **ppvObj
		);

	virtual ULONG STDMETHODCALLTYPE AddRef();

	virtual ULONG STDMETHODCALLTYPE Release();

	//////////////////////////////////////////////////////////////////////////
	//IOleCommandTarget
	virtual HRESULT STDMETHODCALLTYPE QueryStatus( 
		/* [unique][in] */ const GUID *pguidCmdGroup,
		/* [in] */ ULONG uCmds,
		/* [out][in][size_is] */ OLECMD prgCmds[],
		/* [unique][out][in] */ OLECMDTEXT *pCmdText
		);

	virtual HRESULT STDMETHODCALLTYPE Exec( 
		/* [unique][in] */ const GUID *pguidCmdGroup,
		/* [in] */ DWORD dwCmdID,
		/* [in] */ DWORD dwCmdexecopt,
		/* [unique][in] */ VARIANT *pvaIn,
		/* [unique][out][in] */ VARIANT *pvaOut
		);
};